<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>天截选课系统</title>
    <link href="assets/css/Icons.css" rel="stylesheet">
    <!-- Bootstrap Styles-->
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
    <!-- FontAwesome Styles-->
    <link href="assets/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom Styles-->
    <link href="assets/css/custom-styles.css" rel="stylesheet" />
    <!-- Google Fonts-->
    <link href='assets/css/Sans.css' rel='stylesheet' type='text/css' />
    <link rel="stylesheet" href="assets/js/Lightweight-Chart/cssCharts.css">
    <link rel="stylesheet" href="assets/plugins/element-ui/index.css" />
    <style>
        #page-wrapper{
            margin: 0;
            padding: 0;
            top:0;
            min-height: 100vh !important;
        }
        #context{
            width: 100%;
            text-align: center;
            margin-top: 100px;
        }
        #context form{
            margin-top: 20px;
            line-height: 30px;
        }
        #context .line{
            font-size: 20px;
            margin-bottom: 20px;
        }
        #context .line label{
            margin-right: 20px;
            width: 100px;
        }
        .input-message{
            border-radius: 10px;
            padding: 5px;
        }
        #context .line .input-message{
            margin-left: 20px;
            width: 300px;
            background: white;
        }
        #context .line .input-message[readonly]{
            border: red 3px solid;
        }
        #context .line a{
            color: black;
            cursor: pointer;
            text-decoration: none;
        }
        #context .line a:hover{
            background: red;
            color: white;
        }
    </style>
</head>

<body>
<div id="wrapper">
    <div id="page-wrapper">
        <div class="header">
            <h1 class="page-header">
                <!--Dashboard-->
                <span >
                    学生
                </span>
                个人信息
            </h1>
            <ol class="breadcrumb">
                <li><a href="#">Home</a></li>
                <li><a href="#">user-message</a></li>
            </ol>
        </div>
        <div id="context">
            <form>
                <div class="line">
                    <label>学号</label>
                    <input class="input-message" name="studentId" id="studentId"  readonly>
                </div>

                <div class="line">
                    <label>姓名</label>
                    <input class="input-message" name="studentName" id="studentName"  disabled>
                </div>

                <div class="line">
                    <label>手机号</label>
                    <input class="input-message" name="phone" id="phone" disabled>
                </div>

                <div class="line">
                    <label>性别</label>
                    <input class="input-message" name="sex" id="sex" disabled >
                </div>

                <div class="line">
                    <label>专业</label>

                    <input class="input-message" name="specialized" id="specialized"  disabled>
                </div>

                <!--<div class="line">-->
                    <!--<a href="javascript:void(0)" @click="studentUpdate()" style="display: inline-block;" class="input-message">修改信息</a>-->
                    <!--<a style="display: inline-block;width: 100px;margin-left: 20px" class="input-message">修改密码</a>-->
                <!--</div>-->
                <div class="line">
                    <label>地址</label>
                    <input class="input-message" name="address" id="address" disabled>
                </div>
                <div class="line">
                    <label>身份证</label>
                    <input class="input-message" name="idCard" id="idCard" disabled>
                </div>

            </form>
            <div class="providerAddBtn">
                <!--<input type="button" name="save" id="save" value="保存" />-->
                <input type="submit" id="back" name="back" value="返回"/>
            </div>
        </div>
    </div>
    <!-- /. PAGE INNER  -->
</div>
<!-- /. PAGE WRAPPER  -->
</div>
<!-- /. WRAPPER  -->
<!-- JS Scripts-->
<!-- jQuery Js -->
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- Bootstrap Js -->
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/vue.js"></script>
<script src="assets/plugins/element-ui/index.js"></script>
<script>
    var sex="";
    $(function () {
        var val=location.search;
        var index=val.indexOf("=");
        var id=val.substr(index+1);
        $.ajax({
        url:"/student/getStudent",
            data:{"id":id},
            dataType:"json",
            async:false,
            type:"get",
            success:function (data) {
                console.log(data)
            var list=data.data.studentList;
         if(list.sex==1){
             sex="男"
         }else {
             sex="女"
         }

                $("#studentId").val(list.studentId);
                $("#studentName").val(list.studentName);
                $("#phone").val(list.phone);
                $("#sex").val(sex);
                $("#specialized").val(list.specialized);
                $("#address").val(list.address);
                $("#idCard").val(list.idCard);
            }, error:function () {
                alert("查询失败！");
            }

    })
        $("#back").click(function () {
            location.href="tab-panel.html";
        })
    })





</script>

</body>

</html>